import request from '@/utils/request'

export const listCheckitem = (search) => 
    request({
        url: '/checkitem',
        method: 'get',
        params: {
            pageNum: search.pageNum,
            pageSize:search.pageSize,
            queryString:search.queryString
        }
    }) 

export const removeCheckitem = (id) => 
    request({
        url: '/checkitem/' + id,
        method: 'delete'
    })

export const getCheckitemById = (id) =>
    request({
        url: '/checkitem/' + id,
        method: 'get'
    })

export const updateCheckiem = (id, checkitem) =>
    request({
        url: '/checkitem/' + id,
        method: 'put',
        data: checkitem
    })

export const saveCheckitem = (checkitem) => 
    request({
        url: '/checkitem',
        method: 'post',
        data: checkitem
    })

export const listAllCheckitem = () =>
    request({
        url: '/checkitem/all',
        method: 'get'
    })